import Foundation

protocol RepositoryProtocl {
    func fetchComponents() async throws -> [HomeComponent]
}

class ComponentsRepositoryImp: RepositoryProtocl {
    private let dataService: DataService
    
    init(dataService: DataService) {
        self.dataService = dataService
    }
    
    func fetchComponents() async throws -> [HomeComponent] {
        return try await dataService.fetchData(from: .components)
    }
} 
